function selectUserDialog(
    {
        title,
        multipleFlag = false,
        callback = Function()
    }
) {
    const $widget = $(`
        <div>
            <form data-form="search">
                <input type="hidden" name="disableFlag" value="0">
                <div class="audit-top pt0 pl0">
                    <span>关键字</span>
                    <span class="input-select">
                        <input type="text" name="titleLike" value="" placeholder="名称，手机号，邮箱模糊搜索"/>
                    </span>
                    <a class="search-btn ml-20" href="javascript:" data-btn="search">搜索</a>
                </div>
            </form>
            <div data-list="content" class="table-con" style="box-shadow: none;padding: 10px 0 0 0"></div>
        </div>
    `);

    const checkUserList = [];

    //弹窗
    const $dialogWidget = $.dialog($widget, {
        title,
        width: "700px",
        cancel: !multipleFlag ? null : Function(),
        ok: !multipleFlag ? null : () => {
            callback(checkUserList);
        },
    })

    $dialogWidget.find('[data-type="content"]').css({
        "max-height": "600px",
        "overflow": "auto"
    })

    const $searchForm = $widget.find('[data-form="search"]');
    const $listWarp = $widget.find('[data-list="content"]');

    const columnList = [
        {title: "用户名", value: "userName"},
        {title: "手机", value: "phone"},
        {title: "邮箱", value: "email"}
    ];

    if (multipleFlag) {
        //多选
        columnList.unshift({
            title: () => {
                const $checkDom = $(`<input data-checkbox="selAll" type="checkbox" value="">`);
                $checkDom.on("click", () => {
                    if ($checkDom.is(":checked")) {
                        $listWarp.find('[data-checkbox="sel"]:not(:checked)').click();
                    } else {
                        $listWarp.find('[data-checkbox="sel"]:checked').click();
                    }
                });

                return $checkDom;
            },
            value: data => {
                const {userId} = data;
                const $checkDom = $(`<input data-checkbox="sel" type="checkbox" value="">`);
                if (checkUserList.findIndex(item => item.userId === userId) !== -1) {
                    $checkDom.attr("checked", 1);
                }

                $checkDom.on("click", () => {
                    if ($checkDom.is(":checked")) {
                        checkUserList.push({
                            userId: null,
                            ...data
                        });
                    } else {
                        checkUserList.splice(checkUserList.findIndex(item => item.userId === userId), 1);
                    }
                });
                return $checkDom;
            },
            style: "width:50px"
        });
    } else {
        //单选
        columnList.push({
            title: "选中",
            value: data => {
                const $selBtn = $(`<a href="javascript:" class="c-btn btn-blue m5">选中</a>`);
                $selBtn.on("click", () => {
                    if (callback([data]) !== false) {
                        $dialogWidget.remove();
                    }
                });
                return $selBtn;
            }
        });
    }

    const listHandler = $.commonList({
        $warp: $listWarp,
        column: columnList,
        dataSource: (currPage, callback) => {

            $listWarp.find('[data-checkbox="selAll"]').attr("checked", null)

            const param = {
                ...$.getFormData($searchForm),
                pageIndex: currPage,
                pageSize: 10
            };
            queryUserPage(param, ({Code, Message, Result = [], Total}) => {
                if (Code !== 10000) {
                    return callback(Message, 0);
                }

                return callback(Result, Total, param.pageSize);
            });
        }
    });

    //搜索按钮
    $searchForm.find('[data-btn=search]').on("click", () => {
        listHandler.getPage();
    });

    return $dialogWidget;

    function queryUserPage(param, callback = Function()) {
        return $.sApi({
            data: param,
            url: "/api/User/queryUserPage"
        }, callback)
    }

}